package com.citycloud.ccuap.tc.yq.meatbustype;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.citycloud.ccuap.commons.application.Application;
import com.citycloud.ccuap.framework.service.mybatis.MybatisServiceImpl;
import com.citycloud.ccuap.tc.yq.constant.YqConstant;
import com.citycloud.ccuap.tc.yq.entity.MetaBusType;
import com.citycloud.ccuap.tc.yq.repository.MeatBusTypeRepository;

/**
 * 业务类型业务处理实现
 * @author sufeng
 *
 */
@Service
public class MeatBusTypeService extends MybatisServiceImpl<MeatBusTypeRepository, MetaBusType, String> implements IMeatBusTypeService {
	@Override
	public void loadDataToMemory() {
		Map<String, MetaBusType> map = new HashMap<String, MetaBusType>(16);
		
		List<MetaBusType> list = selectList();
		if (list != null) {
			for (MetaBusType metaBusType : list) {
				map.put(metaBusType.getObjId(), metaBusType);
			}
		}
		Application.setAttribute(YqConstant.BUS_TYPE_MAP_KEY, map);
	}
}